<?php


namespace App\Http\Controllers\Api\v1;


use App\common;
use App\Models\Attention;
use Illuminate\Http\Request;


class AttentionController
{

    /**
     * 关注列表
     * @param Request $request
     * @return false|string
     * @name kys
     */
    public function concern(Request $request)
    {
        try {
            $attention=Attention::with('residential')->where('uid',1)->get()->toArray();
            foreach($attention as $v)
            {
                $data[]=$v['residential'];
            }
            //获取房源信息
            return common::success($data,20000,'success');
        }catch (\Exception $e) {
            return common::fail([],0,$e->getMessage());
        }
    }

}
